<body>
    <div id="test"></div>
    <script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
    <script type="text/babel">/*此处一定要写babel*/
    function MyComponent(){
        return <h2>函数式组件</h2>//此处this是undefined,因为babel编译后开启了严格模式
    }
    ReactDOM.render(<MyComponent />, document.getElementById('test'));
    </script>
</body>